Ecclesiastical polity is the way a church runs. It says who the leaders are, like pastors and deacons, and makes rules for them. There are some rules for the local church and other rules for groups of churches.
Christians decide how the church should run based on what they think the church is (ecclesiology). There are three main ways: